package com.dylan.channel.v8;

import com.dylan.channel.v8.channel.Channel;
import com.dylan.channel.v8.factory.ChannelFactory;
import com.dylan.channel.v8.factory.ReflectiveChannelFactory;

public class AbstractBootStrap<B extends AbstractBootStrap<B, C>, C extends Channel> {

    volatile EventLoopGroup group;

    protected volatile ChannelFactory<? extends Channel> channelFactory;

    protected B channel(Class<? extends Channel> clazz) {
        this.channelFactory = new ReflectiveChannelFactory<>(clazz);
        return self();
    }

    private B self() {
        return (B) this;
    }
}
